<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="utf-8"%>
<%@ page import="start.fly.test.database.DBConn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head><title>用户个人信息</title>
    <script  src="../js/jquery-2.1.4.js"></script>
  
     <link rel="stylesheet" href="../css/lanrenzhijia.css" media="all">
           <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
   <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script>
jQuery(document).ready(function($) {
	$('.theme-login').click(function(){
		$('.theme-popover-mask').fadeIn(100);
		$('.theme-popover').slideDown(200);
	});
	$('.theme-poptit .close').click(function(){
		$('.theme-popover-mask').fadeOut(100);
		$('.theme-popover').slideUp(200);
	});
});
$(document).ready(function(){
	$('.user3').click(function(){
		$('#sysid').attr("value",$(this).attr('id'));
	});
});
</script>
</head>
<body >
<div style="padding-left: 15px;height:auto;width:99%;" >
<h1>用户个人信息</h1><hr>
    <div  >
<form action="" method="post" >
 <% 
       String username=request.getParameter("username");
      if(username!=null){
    	  ResultSet rs=null;
    	  PreparedStatement stmt=null;
    	  String sql="select * from user where username=?"; 
        try{
        	DBConn conn=new DBConn();
        	stmt = (PreparedStatement)conn.getCon().prepareStatement(sql);
 			stmt.setString(1,username);
		 rs=stmt.executeQuery();%>
<table class="table table-bordered">
   <thead>
      <tr>
         <th>用户名</th>
         <th>密码</th>
         <th>问题</th>
         <th>答案</th>
         <th>安全码</th>
         <th>邮箱</th>
      </tr>
   </thead>    
         <tbody> 
     <% 
         while(rs.next())
        { %>
                <tr>
                <td><%=rs.getString("username")%></td>
                <td><%=rs.getString("pwd")%></td>
                <td><%=rs.getString("question")%></td>
                <td><%=rs.getString("answer")%></td>
                <td><%=rs.getString("safecode")%></td>
                <td><%=rs.getString("email")%></td>
            </tr>
        <% } 
        }catch(Exception e){
        e.printStackTrace();
        }
      }else{
    	
      }
        %>
           </tbody>
    </table>
</form>
        </div>
    </div>

</body>
</html>
